package com.ruoyi.disasterassessment.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.disasterassessment.mapper.AlarmWarnPredictionModelMapper;
import com.ruoyi.disasterassessment.domain.AlarmWarnPredictionModel;
import com.ruoyi.disasterassessment.service.IAlarmWarnPredictionModelService;

/**
 * 预警预测模型Service业务层处理
 * 
 * @author hcc
 * @date 2023-12-20
 */
@Service
public class AlarmWarnPredictionModelServiceImpl implements IAlarmWarnPredictionModelService 
{
    @Autowired
    private AlarmWarnPredictionModelMapper alarmWarnPredictionModelMapper;

    /**
     * 查询预警预测模型
     * 
     * @param id 预警预测模型主键
     * @return 预警预测模型
     */
    @Override
    public AlarmWarnPredictionModel selectAlarmWarnPredictionModelById(String id)
    {
        return alarmWarnPredictionModelMapper.selectAlarmWarnPredictionModelById(id);
    }

    /**
     * 查询预警预测模型列表
     * 
     * @param alarmWarnPredictionModel 预警预测模型
     * @return 预警预测模型
     */
    @Override
    public List<AlarmWarnPredictionModel> selectAlarmWarnPredictionModelList(AlarmWarnPredictionModel alarmWarnPredictionModel)
    {
        return alarmWarnPredictionModelMapper.selectAlarmWarnPredictionModelList(alarmWarnPredictionModel);
    }

    /**
     * 新增预警预测模型
     * 
     * @param alarmWarnPredictionModel 预警预测模型
     * @return 结果
     */
    @Override
    public int insertAlarmWarnPredictionModel(AlarmWarnPredictionModel alarmWarnPredictionModel)
    {
        alarmWarnPredictionModel.setCreateTime(DateUtils.getNowDate());
        return alarmWarnPredictionModelMapper.insertAlarmWarnPredictionModel(alarmWarnPredictionModel);
    }

    /**
     * 修改预警预测模型
     * 
     * @param alarmWarnPredictionModel 预警预测模型
     * @return 结果
     */
    @Override
    public int updateAlarmWarnPredictionModel(AlarmWarnPredictionModel alarmWarnPredictionModel)
    {
        alarmWarnPredictionModel.setUpdateTime(DateUtils.getNowDate());
        return alarmWarnPredictionModelMapper.updateAlarmWarnPredictionModel(alarmWarnPredictionModel);
    }

    /**
     * 批量删除预警预测模型
     * 
     * @param ids 需要删除的预警预测模型主键
     * @return 结果
     */
    @Override
    public int deleteAlarmWarnPredictionModelByIds(String[] ids)
    {
        return alarmWarnPredictionModelMapper.deleteAlarmWarnPredictionModelByIds(ids);
    }

    /**
     * 删除预警预测模型信息
     * 
     * @param id 预警预测模型主键
     * @return 结果
     */
    @Override
    public int deleteAlarmWarnPredictionModelById(String id)
    {
        return alarmWarnPredictionModelMapper.deleteAlarmWarnPredictionModelById(id);
    }
}
